package com.woniuxy02;

import java.util.Scanner;

/**
 * @author 作者
 * @create 2025-07-21 16:20
 */
public class Person {
    String name;
    int winCount;

    //出拳
    public int fist(){
        Scanner sc = new Scanner(System.in);
        System.out.println("用户出拳：1.剪刀2.石头3.布");
        int userShowNum = sc.nextInt();
        while (!(userShowNum == 1 || userShowNum == 2 || userShowNum == 3)) {
            System.out.println("输入错误，重新输入：1.剪刀2.石头3.布");
            userShowNum = sc.nextInt();
        }
        return userShowNum;
    }

    //显示出拳
    public String showFistName(int userShowNum){
        String userShowName="";
        switch (userShowNum) {
            case 1:
                userShowName = "剪刀";
                break;
            case 2:
                userShowName = "石头";
                break;
            case 3:
                userShowName = "布";
                break;
        }
        return userShowName;
    }

}
